home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 July
/
EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso
/
earcd
/
biz
/
dbase
/
db3_4src.lha
/
db3.4
/
toolbox.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-14
|
7KB
|
208 lines
/* Images for the toolbox */
#include "toolbox.h"
#include "dbGUI.h"
#include <proto/intuition.h>
#define LATER 0
UWORD __chip CheckBoxIData[] =
{
/* Plane 0 */
0x0000,0x0000,0x0040,0x0000,0x0000,0x00C0,0x0000,0x0000,
0x00C0,0x0000,0x0000,0x00C0,0x0000,0x0000,0x00C0,0x0000,
0x0000,0x00C0,0x0000,0x0000,0x20C0,0x0000,0x0000,0x60C0,
0x0000,0x0000,0x60C0,0x0000,0x0000,0x60C0,0x0000,0x0078,
0x60C0,0x0000,0x00C0,0x60C0,0x0000,0x00C0,0x60C0,0x0000,
0x0180,0x60C0,0x0000,0x0180,0x60C0,0x0001,0xC300,0x60C0,
0x0000,0xC200,0x60C0,0x0000,0xE600,0x60C0,0x0000,0x6400,
0x60C0,0x0000,0x7C00,0x60C0,0x0000,0x3800,0x60C0,0x0000,
0x0000,0x60C0,0x0000,0x0000,0x60C0,0x0000,0x0000,0x60C0,
0x00FF,0xFFFF,0xE0C0,0x0000,0x0000,0x00C0,0x0000,0x0000,
0x00C0,0x0000,0x0000,0x00C0,0x0000,0x0000,0x00C0,0x0000,
0x0000,0x00C0,0x7FFF,0xFFFF,0xFFC0,
/* Plane 1 */
0xFFFF,0xFFFF,0xFF80,0xC000,0x0000,0x0000,0xC000,0x0000,
0x0000,0xC000,0x0000,0x0000,0xC000,0x0000,0x0000,0xC000,
0x0000,0x0000,0xC1FF,0xFFFF,0xC000,0xC180,0x0000,0x0000,
0xC180,0x0000,0x0000,0xC180,0x0000,0x0000,0xC180,0x0000,
0x0000,0xC180,0x0000,0x0000,0xC180,0x0000,0x0000,0xC180,
0x0000,0x0000,0xC180,0x0000,0x0000,0xC180,0x0000,0x0000,
0xC180,0x0000,0x0000,0xC180,0x0000,0x0000,0xC180,0x0000,
0x0000,0xC180,0x0000,0x0000,0xC180,0x0000,0x0000,0xC180,
0x0000,0x0000,0xC180,0x0000,0x0000,0xC180,0x0000,0x0000,
0xC100,0x0000,0x0000,0xC000,0x0000,0x0000,0xC000,0x0000,
0x0000,0xC000,0x0000,0x0000,0xC000,0x0000,0x0000,0xC000,
0x0000,0x0000,0x8000,0x0000,0x0000,
};
struct Image CheckBoxI =
{
0, 0, /* Upper left corner */
TBGadW, TBGadH, 2, /* Width, Height, Depth */
CheckBoxIData, /* Image data */
0x0003, 0x0000, /* PlanePick, PlaneOnOff */
NULL /* Next image */
};
UWORD __chip CycleIData[] =
{
/* Plane 0 */
0x0000,0x0000,0x0040,0x0000,0x0000,0x00C0,0x0000,0x0000,
0x00C0,0x0000,0x0000,0x00C0,0x0000,0x0000,0x00C0,0x0000,
0x0000,0x00C0,0x0000,0x0000,0x20C0,0x0000,0x0000,0x60C0,
0x0003,0xF810,0x60C0,0x0006,0x0C10,0x60C0,0x0006,0x0C10,
0x60C0,0x0006,0x3F10,0x60C0,0x0006,0x1E10,0x60C0,0x0006,
0x0C10,0x60C0,0x0006,0x0010,0x60C0,0x0006,0x0010,0x60C0,
0x0006,0x0010,0x60C0,0x0006,0x0010,0x60C0,0x0006,0x0010,
0x60C0,0x0006,0x0010,0x60C0,0x0006,0x0C10,0x60C0,0x0003,
0xF810,0x60C0,0x0000,0x0010,0x60C0,0x0000,0x0000,0x60C0,
0x00FF,0xFFFF,0xE0C0,0x0000,0x0000,0x00C0,0x0000,0x0000,
0x00C0,0x0000,0x0000,0x00C0,0x0000,0x0000,0x00C0,0x0000,
0x0000,0x00C0,0x7FFF,0xFFFF,0xFFC0,
/* Plane 1 */
0xFFFF,0xFFFF,0xFF80,0xC000,0x0000,0x0000,0xC000,0x0000,
0x0000,0xC000,0x0000,0x0000,0xC000,0x0000,0x0000,0xC000,
0x0000,0x0000,0xC1FF,0xFFFF,0xC000,0xC180,0x0000,0x0000,
0xC180,0x0008,0x0000,0xC180,0x0008,0x0000,0xC180,0x0008,
0x0000,0xC180,0x0008,0x0000,0xC180,0x0008,0x0000,0xC180,
0x0008,0x0000,0xC180,0x0008,0x0000,0xC180,0x0008,0x0000,
0xC180,0x0008,0x0000,0xC180,0x0008,0x0000,0xC180,0x0008,
0x0000,0xC180,0x0008,0x0000,0xC180,0x0008,0x0000,0xC180,
0x0008,0x0000,0xC180,0x0008,0x0000,0xC180,0x0000,0x0000,
0xC100,0x0000,0x0000,0xC000,0x0000,0x0000,0xC000,0x0000,
0x0000,0xC000,0x0000,0x0000,0xC000,0x0000,0x0000,0xC000,
0x0000,0x0000,0x8000,0x0000,0x0000,
};
struct Image CycleI =
{
0, 0, /* Upper left corner */
TBGadW, TBGadH, 2, /* Width, Height, Depth */
CycleIData, /* Image data */
0x0003, 0x0000, /* PlanePick, PlaneOnOff */
NULL /* Next image */
};
UWORD __chip StringIData[] =
{
/* Plane 0 */
0x0000,0x0000,0x0040,0x0000,0x0000,0x00C0,0x0000,0x0000,
0x00C0,0x0000,0x0000,0x00C0,0x0000,0x0000,0x00C0,0x0000,
0x0000,0x00C0,0x0000,0x0000,0x20C0,0x00FF,0xFFFF,0x60C0,
0x00C0,0x0000,0x60C0,0x00C0,0x0000,0x60C0,0x00C3,0xC400,
0x60C0,0x00C4,0x2400,0x60C0,0x00C4,0x0EA0,0x60C0,0x00C3,
0x04C0,0x60C0,0x00C0,0xC480,0x60C0,0x00C0,0x2480,0x60C0,
0x00C4,0x2480,0x60C0,0x00C4,0x2480,0x60C0,0x00C3,0xC680,
0x60C0,0x00C0,0x0000,0x60C0,0x00C0,0x0000,0x60C0,0x00C0,
0x0000,0x60C0,0x00C0,0x0000,0x60C0,0x0080,0x0000,0x60C0,
0x01FF,0xFFFF,0xE0C0,0x0000,0x0000,0x00C0,0x0000,0x0000,
0x00C0,0x0000,0x0000,0x00C0,0x0000,0x0000,0x00C0,0x0000,
0x0000,0x00C0,0x7FFF,0xFFFF,0xFFC0,
/* Plane 1 */
0xFFFF,0xFFFF,0xFF80,0xC000,0x0000,0x0000,0xC000,0x0000,
0x0000,0xC000,0x0000,0x0000,0xC000,0x0000,0x0000,0xC000,
0x0000,0x0000,0xC3FF,0xFFFF,0xC000,0xC300,0x0000,0x8000,
0xC300,0x0001,0x8000,0xC300,0x0001,0x8000,0xC300,0x0001,
0x8000,0xC300,0x0001,0x8000,0xC300,0x0001,0x8000,0xC300,
0x0001,0x8000,0xC300,0x0001,0x8000,0xC300,0x0001,0x8000,
0xC300,0x0001,0x8000,0xC300,0x0001,0x8000,0xC300,0x0001,
0x8000,0xC300,0x0001,0x8000,0xC300,0x0001,0x8000,0xC300,
0x0001,0x8000,0xC300,0x0001,0x8000,0xC37F,0xFFFF,0x8000,
0xC200,0x0000,0x0000,0xC000,0x0000,0x0000,0xC000,0x0000,
0x0000,0xC000,0x0000,0x0000,0xC000,0x0000,0x0000,0xC000,
0x0000,0x0000,0x8000,0x0000,0x0000,
};
struct Image StringI =
{
0, 0, /* Upper left corner */
TBGadW, TBGadH, 2, /* Width, Height, Depth */
StringIData, /* Image data */
0x0003, 0x0000, /* PlanePick, PlaneOnOff */
NULL /* Next image */
};
struct Gadget ToolBoxGadgets[] = {
{
NULL, LATER, LATER,
TBGadW, TBGadH,
GFLG_GADGHCOMP|GFLG_GADGIMAGE, /* Flags */
GACT_RELVERIFY, /* Activation */
GTYP_BOOLGADGET, /* GadgetType */
&CheckBoxI, /* GadgetRender */
NULL, /* SelectRender */
NULL, /* GadgetText */
0, /* MutualExclude */
NULL, /* SpecialInfo */
CheckBoxID, /* GadgetID */
NULL /* UserData */
},
{
&ToolBoxGadgets[CheckBoxID], LATER, LATER,
TBGadW, TBGadH,
GFLG_GADGHCOMP|GFLG_GADGIMAGE, /* Flags */
GACT_RELVERIFY, /* Activation */
GTYP_BOOLGADGET, /* GadgetType */
&CycleI, /* GadgetRender */
NULL, /* SelectRender */
NULL, /* GadgetText */
0, /* MutualExclude */
NULL, /* SpecialInfo */
CycleID, /* GadgetID */
NULL /* UserData */
},
{
&ToolBoxGadgets[CycleID], LATER, LATER,
TBGadW, TBGadH,
GFLG_GADGHCOMP|GFLG_GADGIMAGE, /* Flags */
GACT_RELVERIFY, /* Activation */
GTYP_BOOLGADGET, /* GadgetType */
&StringI, /* GadgetRender */
NULL, /* SelectRender */
NULL, /* GadgetText */
0, /* MutualExclude */
NULL, /* SpecialInfo */
StringID, /* GadgetID */
NULL /* UserData */
}
};
void CloseToolBox(struct Window *win)
{
CloseWindow(win);
}
struct Window *OpenToolBox(struct Window *parent)
{
struct Window *win;
ToolBoxGadgets[StringID].LeftEdge = OffX;
ToolBoxGadgets[StringID].TopEdge = OffY;
ToolBoxGadgets[CycleID].LeftEdge = OffX;
ToolBoxGadgets[CycleID].TopEdge = OffY + TBGadH;
ToolBoxGadgets[CheckBoxID].LeftEdge = OffX;
ToolBoxGadgets[CheckBoxID].TopEdge = OffY + 2*TBGadH;
win = OpenWindowTags( NULL,
WA_Left, parent->LeftEdge + parent->Width+32,
WA_Top, parent->TopEdge,
WA_Width, OffX + TBGadW + Scr->WBorRight,
WA_Height, OffY + 3*TBGadH + Scr->WBorBottom,
WA_IDCMP, IDCMP_GADGETUP,
WA_Flags, WFLG_NEWLOOKMENUS|WFLG_RMBTRAP|WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_SMART_REFRESH,
WA_Gadgets, &ToolBoxGadgets[StringID],
WA_ScreenTitle, parent->ScreenTitle,
WA_PubScreen, Scr,
TAG_DONE );
return win;
}